@section head{ 
    <link href="~/theme/default/syssetting/loglogin.index.css" rel="stylesheet" asp-append-version="true" />
} 
<div class="zb-flex-1 zb-flex zb-flex-column zb-w"> 
    <div class="zb-query-frame"> 
         
        <div class="query-block">
            <span>登录日期：</span>
            <el-date-picker v-model="query.date"
                            type="daterange"
                            range-separator="至"
                            start-placeholder="开始日期"
                            end-placeholder="结束日期"
                            value-format="yyyy-MM-dd"
                            size="mini">
            </el-date-picker>
        </div> 
         
        <div class="query-block"> 
            <span>登录人員：</span> 
            <el-input placeholder="请输入登录人員" 
                      v-model="query.logUser"
                      size="mini"> 
            </el-input> 
        </div> 
         
        <div class="query-block">
            <span>登录类型：</span>
            <el-select v-model="query.logType" 
                       placeholder="请选择登录类型"
                       size="mini">
                <el-option v-for="item in loginTypeArr"
                           :key="item.sub_value"
                           :label="item.sub_name"
                           :value="item.sub_value">
                </el-option>
            </el-select>
        </div> 
         
        <div class="query-block">
            <span>登录终端：</span>
            <el-select v-model="query.logTerminal" 
                       placeholder="请选择登录终端"
                       size="mini">
                <el-option v-for="item in loginTerminalArr"
                           :key="item.sub_value"
                           :label="item.sub_name"
                           :value="item.sub_value">
                </el-option>
            </el-select>
        </div> 
        
        <div class="query-block"> 
            <span>登录IP：</span> 
            <el-input placeholder="请输入登录IP" 
                      v-model="query.logIp"
                      size="mini"> 
            </el-input> 
        </div> 
         
        <div class="query-block"> 
            <el-button type="primary" 
                       icon="el-icon-search" 
                       @@click="onQuery" 
                       v-if="buttons.hasQuery"
                       size="mini">查询</el-button> 
        </div> 
    </div> 
    <el-table :data="tableData.records"
              height="250"
              border
              class="zb-border-no"
              ref="tblRecords"
              style="width: 100%"
              size="mini">
        <el-table-column type="index"
                         width="50"
                         align="center"
                         title="序号"
                         :index="recordIndex"
                         fixed="left">
        </el-table-column>

        <el-table-column prop="log_date"
                         label="登录时间"
                         width="140"
                         align="center">
            <template slot-scope="scope">
                <span v-text="scope.row.log_date.replace('T',' ')"></span>
            </template>
        </el-table-column>

        <el-table-column prop="log_user"
                         label="登录人員"
                         width="180">
        </el-table-column>

        <el-table-column prop="log_type"
                         label="登录类型"
                         width="90"
                         align="center">
            <template slot-scope="scope">
                <span v-text="loginType[scope.row.log_type]||''"></span>
            </template>
        </el-table-column>

        <el-table-column prop="log_terminal"
                         label="登录设备"
                         width="90"
                         align="center">
            <template slot-scope="scope">
                <span v-text="loginTerminal[scope.row.log_terminal]||''"></span>
            </template>
        </el-table-column>

        <el-table-column prop="log_ip"
                         label="登录IP"
                         width="120"
                         align="center">
        </el-table-column>
        <el-table-column prop="log_status"
                         label="状态"
                         width="90"
                         align="center">
            <template slot-scope="scope">
                <span v-text="status[scope.row.log_status]||''" :class="getStatusClass(scope.row.log_status)"></span>
            </template>
        </el-table-column>
        <el-table-column prop="log_memo"
                         label="备注">
        </el-table-column>
    </el-table> 
    <el-pagination background 
                   layout="prev, pager, next, jumper, total" 
                   :page-size="query.pageSize" 
                   :total="tableData.total" 
                   @@current-change="onPageChange"> 
    </el-pagination>
</div> 
@section script{ 
    <script src="~/module/common/form.template.js" type="text/babel"></script> 
    <script src="~/module/baseinfo/loglogin.index.js" asp-append-version="true" type="text/babel"></script> 
} 
